#!/bin/bash

# the sed change command 'c' can replace a existing line with new text
# In an other words: replace given line with new line 

# syntax: sed '[command] c {the-line-to-insert}' {input-file}

# - delete the record at line number 2 and replace it with a new record
sed '4 c 202,Hustion Huang,Engineer' ./test_employee.txt

# - delete the line that matches 'Raj' and replace it with two new lines
sed '/Raj/c\
203, Jack Johnson, Engineer\
204, Mutacch,Sales Engineer' ./test_employee.txt

